<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String tree = request.getAttribute("tree") == null ? "" : request.getAttribute("tree").toString();
	String menuId = request.getAttribute("menuId") == null ? "" : request.getAttribute("menuId").toString();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>"/>
		<title>中诚信资讯 | 权限管理系统</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=7" />
		<meta http-equiv="pragma" content="no-cache"/>
		<meta http-equiv="cache-control" content="no-cache"/>
		<meta http-equiv="expires" content="0"/>
		<link id="editCss" rel="stylesheet" type="text/css" href="<%=basePath %>css/style.css" />
		<link id="editCss" rel="stylesheet" type="text/css" href="<%=basePath %>css/right.css" />
		<script type="text/javascript" src="<%=basePath %>js/base.js"></script>
        <script type="text/javascript" src="<%=basePath %>js/tween.js"></script>
        <script type="text/javascript" src="<%=path %>/js/ui.js"></script>
		<script type="text/javascript">        
/*横向滚动*/
function setPlayType(o){
	var obj=document.getElementById('leftBox');
	if(o.className=='open'){
		showBox(obj,obj.offsetWidth,180,'width',20);
		o.className='';
	}else{
		showBox(obj,obj.offsetWidth,0,'width',20);
		o.className='open';
	}
}
/*纵向滚动*/
function disLeftTab(obj,num){
	if(num == 0){
		return true;
	}
	var base=ylBase;
	var nextObj=base.reNextSibing(obj);
	var brotherObjs = nextObj.parentNode.childNodes;
	if(obj.className=='open'){
		obj.className='title';
		showBox(nextObj,nextObj.offsetHeight,0,'height');
	}else{
		obj.className='open';
		nextObj.style.display = 'block';//新修改内容 2010-05-04 解决2次点击的问题
		showBox(nextObj,nextObj.offsetHeight,num,'height');
	}
}

function disLeftTab1(obj,num){
	var base=ylBase;
	var nextObj=base.reNextSibing(obj);
	var proObj=obj.parentNode;	
	var childObjs = nextObj.childNodes;
	var grandSons = 0;
	var nextgrandSons = 0;
	for (var i=0; i<childObjs.length; i++) {
		if(childObjs[i].nodeName == 'A'){
		  childObjs[i].className='_off';
		}
		if(childObjs[i].nodeName == 'DIV'){
			if(childObjs[i].style.display == 'none'){
				
			}else{
				var gsObjs= childObjs[i].childNodes;
				for(var j = 0;j<gsObjs.length;j++){
					if(gsObjs[j].nodeName=='A'){
						grandSons = grandSons+1;
					}
					if(gsObjs[j].nodeName == 'DIV'){
						if(gsObjs[j].style.display == 'none'){
						} else {
							var grandGrandSons = gsObjs[j].childNodes;
							for(var m = 0;m<grandGrandSons.length;m++){
								if(grandGrandSons[m].nodeName=='A'){
									nextgrandSons = nextgrandSons+1;
								}
								
							}
						}
					}
				}
			}
		  childObjs[i].style.display = 'none';
		  showBox(childObjs[i],childObjs[i].offsetHeight,0,'height');
		}
	}
	if(obj.className=='_on'){
		obj.className='_off';
		showBox(nextObj,nextObj.offsetHeight,0,'height');
		showBox(proObj,proObj.offsetHeight,proObj.offsetHeight-num-(grandSons+nextgrandSons)*20,'height');	
	}else{
		obj.className='_on';
		var brotherObjs = nextObj.parentNode.childNodes;
		for(var i = 0;i<brotherObjs.length;i++){
			if(brotherObjs[i] == nextObj){
				brotherObjs[i].style.display = 'block';
			}
			
		}
		showBox(nextObj,nextObj.offsetHeight,num,'height');
		showBox(proObj,proObj.offsetHeight,proObj.offsetHeight+num,'height');
	}
}


function disLeftTab2(obj,num){
	var base=ylBase;
	var nextObj =base.reNextSibing(obj);
	var proObj=obj.parentNode;	
	var proProObj= proObj.parentNode;	
	var grandSons = 0;
	
	var childObjs = nextObj.childNodes;
	

	for (var i=0; i<childObjs.length; i++) {
		if(childObjs[i].nodeName == 'A'){
		  childObjs[i].className='_off';
		}
		if(childObjs[i].nodeName == 'DIV'){
			if(childObjs[i].style.display == 'none'){
				
			}else{
				var gsObjs= childObjs[i].childNodes;
				for(var j = 0;j<gsObjs.length;j++){
					if(gsObjs[j].nodeName=='A'){
						grandSons = grandSons+1;
					}
				}
			}
		  childObjs[i].style.display = 'none';
		  showBox(childObjs[i],childObjs[i].offsetHeight,0,'height');
		}
	}	
	if(obj.className=='_on'){
		obj.className='_off';
		nextObj.style.display = 'none';
		showBox(nextObj,nextObj.offsetHeight,0,'height');
		showBox(proObj,proObj.offsetHeight,proObj.offsetHeight-num-grandSons*20,'height');	
		showBox(proProObj,proProObj.offsetHeight,proProObj.offsetHeight-num-grandSons*20,'height');
	}else{
		obj.className='_on';
		var brotherObjs = nextObj.parentNode.childNodes;
		for(var i = 0;i<brotherObjs.length;i++){
			if(brotherObjs[i] == nextObj){
				brotherObjs[i].style.display = 'block';
			}
		}
		showBox(nextObj,nextObj.offsetHeight,num,'height');
		showBox(proObj,proObj.offsetHeight,proObj.offsetHeight+num,'height');
		showBox(proProObj,proProObj.offsetHeight,proProObj.offsetHeight+num,'height');
	}
}

function disLeftTab3(obj,num){
	var base=ylBase;
	var nextObj=base.reNextSibing(obj);
	var proObj=obj.parentNode;	
	var proProObj= proObj.parentNode;	
	var proProProObj= proProObj.parentNode;
	var childObjs = nextObj.childNodes;
	for (var i=0; i<childObjs.length; i++) {
		if(childObjs[i].nodeName == 'A'){
		  childObjs[i].className='_off';
		}
	}

	if(obj.className=='_on'){
		obj.className='_off';
		nextObj.style.display = 'none';
		showBox(nextObj,nextObj.offsetHeight,0,'height');
		showBox(proObj,proObj.offsetHeight,proObj.offsetHeight-num,'height');	
		showBox(proProObj,proProObj.offsetHeight,proProObj.offsetHeight-num,'height');
		showBox(proProProObj,proProProObj.offsetHeight,proProProObj.offsetHeight-num,'height');
	}else{
		obj.className='_on';
		var brotherObjs = nextObj.parentNode.childNodes;
		for(var i = 0;i<brotherObjs.length;i++){
			if(brotherObjs[i] == nextObj){
				brotherObjs[i].style.display = 'block';
			}
		}
		showBox(nextObj,nextObj.offsetHeight,num,'height');
		showBox(proObj,proObj.offsetHeight,proObj.offsetHeight+num,'height');
		showBox(proProObj,proProObj.offsetHeight,proProObj.offsetHeight+num,'height');
		showBox(proProProObj,proProProObj.offsetHeight,proProProObj.offsetHeight+num,'height');
	}
}

/*层高*/
var zIndex=100;
/*调用函数*/
function popUp(id,title,url,width,height,callBack,content){
	zIndex+=2;
	var conHeight=height-20;
	if(url){
		var con='<iframe id="'+id+'_iframe" src="'+url+'" scrolling="auto" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" class="conIframe" style="height:'+conHeight+'px;"></iframe>';
	}else{
		var con=content;
	}
	popUpAdapter(id,{title:title,con:con,width:width,height:height,conHeight:conHeight,css:'popUpCss',bgCss:'popUpBgCss',zIndex:zIndex},callBack)
}
var leftMenuObj=null;
function leftMenuClick(obj,onCss,offCss){
	if(leftMenuObj)leftMenuObj.o.className=leftMenuObj.offCss;
	leftMenuObj={o:obj,offCss:offCss};
	leftMenuObj.o.className=onCss;
}
/* html菜单指向 2010-02-23 ADD */
function initLeftMenu(id1,id2){
	document.getElementById(id1).onclick();
	if(id2)document.getElementById(id2).onclick();
}

window.onload=function(){
	initPageWH();
	//initLeftMenu("hang1","hang2");
}
/* 页面跳转*/
function activeParentMenu(id,url){
		window.parent.document.getElementById(id).src = url;
}
</script>
</head>
<body class="leftBody">
	<div id="treeBox" class="tree">    
    
    	<% 
    		if(!tree.equals("")){
    			out.println(tree);
    		}
    	%>
    </div>
    <input id="root" type="hidden" name="root" value="<%=menuId %>"/>
</body>
</html>
